import request from '@/utils/request'
// 文章列表
export const getArticleList = ({ current, pageSize, sorter }) => {
  return request.get('/h5/interview/query', { params: { current, pageSize, sorter } })
}
// 喜欢
export const getLikeList = ({ page, pageSize, optType }) => {
  return request.get('/h5/interview/opt/list', {
    params: {
      page, pageSize, optType: 1
    }
  })
}
// 收藏
export const getCollectList = ({ page, pageSize, optType }) => {
  return request.get('/h5/interview/opt/list', {
    params: {
      page, pageSize, optType: 2
    }
  })
}
// 文章详情
export const getArticleDetail = id => {
  return request.get('/h5/interview/show', { params: { id } })
}
// 切换喜欢/不喜欢
export const checkLike = id => {
  return request.post('/h5/interview/opt', { id, optType: 1 })
}
// 切换收藏/不收藏
export const checkCollect = id => {
  return request.post('/h5/interview/opt', { id, optType: 2 })
}
